<template>
  <div class="app-container">
    <el-table
      v-loading="listLoading"
      :data="list"
      element-loading-text="Loading"
      border
      fit
      highlight-current-row
    >
      <el-table-column align="center" label="序号" width="120">
        <template slot-scope="scope">
          {{ scope.$index }}
        </template>
      </el-table-column>
      <el-table-column label="时间" width="200" align="center">
        <template slot-scope="scope">
          <span>{{ scope.row.time }}</span>
        </template>
      </el-table-column>
      <el-table-column label="状态" width="200" align="center">
        <template slot-scope="scope">
          <span>{{ scope.row.status?"完成":"处理中" }}</span>
        </template>
      </el-table-column>
      <el-table-column align="center" prop="created_at" label="操作" width="200">
        <template slot-scope="{row}">
          <el-link v-if="row.status" :href="row.url" type="primary">下载</el-link>
          <el-button v-else type="text" size="medium">上传模板</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>
<script>

export default {
  data() {
    return {
      list: [{
        time: 2021,
        status: 0,
        url: ''
      },
      {
        time: 2020,
        status: 1,
        url: 'http://www.baidu.com/'
      },
      {
        time: 2019,
        status: 1,
        url: 'http://www.baidu.com/'
      }]
    }
  },
  created() {
  },
  methods: {
  }
}
</script>

<style>
.header{
  margin-bottom: 10px;
}
</style>
